<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		 <style>
    .box{margin: 50px auto;border:1px solid #ccc;background: #fc9;color:#fff;}
    .red{width: 80px;height: 100px;background: red;float:left;}
    .sienna{width: 80px;height: 100px;background: sienna;float:left;}
    .blue{width: 80px;height: 100px;background: blue;float:left;}
    
    .clearfix:after{
    content:"";/*设置内容为空*/
    height:0;/*高度为0*/
    line-height:0;/*行高为0*/
    display:block;/*将文本转为块级元素*/
    visibility:hidden;/*将元素隐藏*/
    clear:both;/*清除浮动*/
}
</style>
	</head>
	

<body>
<div class="box clearfix">
    <div class="red">1</div>
    <div class="sienna">2</div>
    <div class="blue">3</div>
    <div class="clear"></div>
    
</div>
</body>
</html>
